/*
 *  vovkulaka - printer configuration management
 *
 *  Copyright (C) 2011 by Volodymyr M. Shcherbyna <volodymyr@shcherbyna.com>
 *
 *	This file is part of vovkulaka.
 *
 *  vovkulaka is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  vovkulaka is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with vovkulaka.  If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include <windows.h>
#include <tchar.h>
#include <shlwapi.h>

#define SECTION_PRINTERS TEXT("Printer")

class CPrintersManagement;

class CConfiguration
{
	friend class CPrintersManagement;

public:
	CConfiguration(TCHAR * szFilePath);
	~CConfiguration(void);
public:
	bool Flush();
public: /// properties
	bool getNoConfig(void);
	bool setPrinterName(TCHAR * szName);
	bool setPrinterAttributes(DWORD dwAttr);
	TCHAR * getPrinterName();
	DWORD getPrinterAttributes();
private:
	TCHAR	m_szConfigFile[MAX_PATH];
	TCHAR	m_szPrinterName[MAX_PATH];	
	DWORD	m_dwAttributes;
	bool	m_bNoConfig;
	HANDLE	m_hFile;
};
